package com.wheel.core.time;/*
 * <h3>Title:ai-chiefcomplaint系统</h3>
 * <p>Copyright (c) 2021, wnfbx. All rights reserved.</p>
 * @author wnfbx
 */

import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Date;

/**
 * <dt>Description:WheelDateTime</dt>
 * <dd>本地时间处理</dd>
 *
 * @author wnfbx
 * @version 1.0 <i>2021/8/5 18:09</i>
 * @since jdk1.7+
 */
public class WheelDateTime {

    public static final ZoneId zoneIdChina = ZoneId.of("GMT+08:00");

    public static ZonedDateTime now() {
        return ZonedDateTime.now(zoneIdChina);
    }

    public static Date nowDate() {
        return Date.from(now().toInstant());
    }

    public static long nowTimestamp() {
        return now().toInstant().toEpochMilli();
    }
}
